package com.example.demo.result;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 何景航
 * @date 2025/3/11 13:19
 */
@Slf4j
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class R {
    private int code;
    private String msg;
    private Object info;
    private static R OK(){
        return R.builder().code(200).msg("成功").info(null).build();
//        return  new R(200,"成功",null);
    }
    private static R Fail(){
        return R.builder().code(500).msg("失败").info(null).build();
//        return  new R(500,"ERROR",null);
    }
}
